home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 October: Mac OS SDK / Dev.CD Oct 96 SDK / Dev.CD Oct 96 SDK1.toast / Development Kits (Disc 1) / MacSNMP / SNMP Agents Dev Kit / MacSNMP Developer Read Me next >
Encoding:
Text File  |  1994-11-21  |  7.2 KB  |  152 lines  |  [ttro/ttxt]

  1. MacSNMP Developer Read Me (v 1.1)
  2. ########################
  3.  
  4. May 12, 1994
  5. Copyright ©1994, Apple Computer, Inc. 
  6. All rights reserved.
  7.  
  8. Building an SNMP Agent for MacSNMP 1.1 requires the Apple Shared Library Manager version 1.1.2. For more detailed documentation on the Shared Library Manager 1.1.2, look on E.T.O CD ROM #12 or later. SNMP Agents built with previous versions of ASLM will not be supported. You should upgrade your SNMP libraries by recompiling and linking them with the new ASLM 1.1.2.
  9.  
  10. Upgrading an SNMP library for MacSNMP 1.1 and ASLM 1.1.2
  11. ====================================================
  12. The upgrade procedure is fairly straightforward. You can compare the sources of the SampleAgent 1.0.2 and 1.1 to have comprehensive idea of what to do. Here are the main steps:
  13.  
  14. 1) Use the header files, libraries and tools found on the MacSNMP Developer disks version 1.1 instead of the old ones.
  15.  
  16. 2) The BuildSharedLibrary commands now use option "-lib" instead of "-o" and needs the client object file needs to be in the list of libraries. You should update your makefile accordingly.
  17.  
  18. 3) Append a version string to the ASLM class IDs of your agent and variables classes. For example the ASLM class ID of the class TSampleSNMPAgent is now: "snmp:agt$TSampleSNMPAgent,1.1" where the version information “,1.1” has been added. 
  19. This feature allows the Shared Library Manager to automatically load the more recent version of a class.
  20.  
  21. 4) In the .exp files, be sure to use a unique library ID for each library. The Shared Library Manager version 1.1.2 now enforces this uniqueness. 
  22.  
  23. 5) If you need your SNMP agent to stay loaded in memory use the flags preload and stayLoaded.
  24.  
  25. 5) In your .cp files, change the type of the integer used for the calls to Preflight and Postflight from short to long. 
  26.  
  27. 6) If you need one and only one instance of a class, register it with the global arbitrator using a string that identifies the class across versions. For example the SampleAgent version 1.1 uses the root of class ID string ""snmp:agt$TSampleSNMPAgent", without the version information, because the same string were used by the version 1.0 of the SampleAgent.
  28.  
  29. NOTA BENE
  30. ==========
  31. The libraries and header files from the “ASLM Developer Tools” version 1.1.1 that are included in this disk are compatible with the “Shared Library Manager” version 1.1.2.
  32.  
  33.  
  34. MacSNMP PROGRAMMER'S GUIDE ERRATA
  35. ====================================
  36. The Local API doesn't behave as documented in the MacSNMP Programmer's guide. The routine GetVariableInfo doesn't return snmpBadID at the end of MIB or when a given OID is not registered. Instead the field netxMIBlet set to NULL after the last valid OID. 
  37.  
  38.  
  39. BUG FIXES
  40. =========
  41. • DrWatson and DrWatsonTool
  42.  
  43. The get-all command over UDP would go into an infinite loop at end of MIB.
  44.  
  45. Fixed several bugs caused by non-initialized pointers or too small buffers.
  46.  
  47. Increase the performance of the MPW tool version in term of number of SNMP packets porcessed by seconds.
  48.  
  49. • SNMPAgentTool
  50.  
  51. Fix a bug that would create a second ghost agent instance when adding an agent for which its library has been dropped in the Extensions folder after and the class has the preload flag set. Now the SNMPAgentTool calls LoadClass/UnloadClass to create the preload class -- if any -- and  if there's still no agent then calls NewObject. The benefit of this fix is that it is now possible to load and unload an agent then trash the library without rebooting.
  52.  
  53. Using the SNMPAgentTool
  54. =======================
  55. The SNMPAgentTool is a stand-alone application that allows you to load and unload SNMP agents.  To use the tool, follow these steps:  
  56.  
  57. 1.  Launch the SNMPAgentTool.  A window will appear containing the following text:
  58.  
  59.     Function desired ( A[ddAgent], R[emoveAgent], L[istAgents] or Q[uit] ):
  60.  
  61. 2.  To add an agent type  'a'  or "addagent" (not case sensitive) and press Return.  The following line will appear:
  62.  
  63.     Agent Class desired :
  64.  
  65. 3.  Type the name of the agent's class.  For the sample agent, the class is TSampleSNMPAgent.  (Note: The class name is case sensitive.)  The following response will appear:
  66.  
  67.     ### Agent is not present.
  68.     ### Creating "snmp:agt$TSampleSNMPAgent".
  69.     ### Agent pointer is 0008F314
  70.  
  71.    (Note:  The pointer value will vary.)
  72.  
  73. 4.  To remove an agent type 'r' or "removeagent" and press Return.  The following line will appear:
  74.  
  75.     Agent Class desired :
  76.  
  77. 5.  Type the name of the agent's class. If you type "TSampleSNMPAgent", the following response will appear:
  78.  
  79.     ### Found agent "snmp:agt$TSampleSNMPAgent".
  80.     ### Agent "snmp:agt$TSampleSNMPAgent" has been removed.
  81.  
  82.  
  83. Other tools and libraries
  84. ======================
  85. 1. DrWatson and DrWatsonTool: a SIOW application and its equivalent MPW Tool that allow to query SNMP agents over the network.
  86.         
  87. 2.  SNMP TCP/IP Transport: allows MacSNMP to work with MacTCP. You need to place this in your Extensions folder to use SNMP over the TCP/IP network.  
  88.  
  89.  
  90. DISK CONTENTS
  91. ==============
  92. Note: Entries enclosed between two ‘:’ indicate folders.
  93.  
  94. MacSNMP Developer:
  95.          MacSNMP Developer Read Me            # this file in TeachText format
  96.          Network Cards & SNMP Tech Note
  97.  
  98.          :SNMP Interfaces:                             # interface files from SNMP
  99.                 SNMP.h
  100.                 SNMPVarTypes.h
  101.                 SNMPTypes.r     
  102.                 SNMPVersionResource.r   
  103.                 TSNMP.h     
  104.  
  105.        :Shared Library Manager Interfaces:    # interface files from Shared Library Manager
  106.                 LibraryManager.h
  107.                 LibraryManagerClasses.h
  108.                 LibraryManagerUtilities.h
  109.                 VersionResource.r
  110.                 Shared Library Manager Read Me
  111.  
  112.         :Libraries:                                          #libraries needed to build MacSNMP agents
  113.                 LibraryManager.o
  114.                 LibraryManager.n.o
  115.                 SNMPLibrary.clf.o
  116.                 SNMPLibrary.cln.o
  117.  
  118.          :Sample Agent:                                   # SNMP Sample Agent implementation
  119.                 :built:                                          # folder where the result of the build is put
  120.                 Makefile
  121.                 SampleAgent MIB
  122.                 Sample Agent Read Me
  123.                 :Objects:                                      # temporary folder for Objects
  124.                 :Sources:                                      # Source and header files
  125.                         SampleAgent.cp      
  126.                         SampleAgent.h      
  127.                         SampleAgent.r      
  128.                         SampleAgent.exp     
  129.                         SampleVar.h      
  130.  
  131.         :Tools:
  132.                 BuildSharedLibrary
  133.                 CreateLibraryLoadRsrc
  134.                 LibraryBuilder
  135.                 LinkSharedLibrary
  136.                 SNMP Sample Agent
  137.                 SNMP TCP/IP Transport
  138.                 SNMPAgentTool
  139.         :SNMP Tool: 
  140.                         DrWatson
  141.                         DrWatsonTool
  142.                         SNMP Tool Manual
  143.                         mib.txt
  144.                         ATMode.in
  145.                         inputTestScript
  146.                         NBPMode.in
  147.                         Sample.in
  148.                         setATAddress
  149.                         setIPAddress
  150.                         setNBPAddress
  151.                         UDPMode.in
  152.